<?php
/** Subclass to  myClass 
* @category		HeroOccupationClass
* @name			myFighter
* @description	Determines Allowed  Weapons,Cloths,Magic Items  Items to be used
* 				Determines Allows   Weapons,Clothing,Magic Iems  that can be sold
* 				Determines Base and Per-Level Advancement  Modifiers MagicSlot,InventorySlot,Defense,Attack,Detect,Hide 
* 				Determines Required Stat Levels to be in a given class, as well as  daily gold increases for profession.
* 				Specialty subclasses may be supported later *TODO*
* 
*/

  class myFighter extends myClass {
	  public 	$Name 								= "Fighter" ;
	  private	$BaseDamage 						= 5 ;
	  private	$BaseDetection 						= 0;
	  private	$BaseDefense 						= 10;
	  private	$BaseHide 							= 2.5;
	  private	$BaseAbilityPoints					= 6;
	  private	$AbilityPointsPerLevel				= 2;
	  private	$AbilityPointBounusEveryXLevels		= 4;
	  private	$AbilityPointBonusValue				= 3;
	  private	$DamageModiferPerLevel 				= .25;
	  private	$AllowsMagic 						= FALSE;
	  private	$MagicSlotModiferPerLevel 			= 0;
	  private	$MagicSlotBonusEveryXLevels			= 4;
	  private 	$MagicSlotBonusValue				= 1;
	  private	$InventorySlotPerLevel 				= .10 ;
	  private	$InventorySlotBonusEveryXLevels 	= 3;
	  private	$InventorySlotBonusValue			= 5;
	  
	  
	  function CanHaveMagicBonus(){
		  return $this->AllowsMagic;
		  
	  }
	  function GetMagicPointIncrease($NewClassLevel){
		  if(!$this->AllowsMagic)
			return 0;
		  if ($NewClassLevel / $this->MagicSlotBonusEveryXLevels)
			return $this->MagicSlotModiferPerLevel + $this->MagicSlotBonusValue;
		  return $this->MagicSlotModiferPerLevel;
	  }
	  function GetInventorySlotIncrease($NewClassLevel){
		  if($NewClassLevel / $this->InventorySlotBonusEveryXLevels)
			return $this->InventorySlotPerLevel + $this->InventorySlotBonusValue;
		  return $this->InventorySlotPerLevel;
	  }
	  function GetAbilityPointIncrease($NewClassLevel){
		  if($NewClassLevel / $this->AbilityPointBounusEveryXLevels)
			return $this->AbilityPointsPerLevel + $this->AbilityPointBonusValue;
		  return $this->AbilityPointsPerLevel;
	  }
	  ///* TODO */function GetFeatPointIncrease(){}
	  
	  function ExperinceNeededForNextLevel($NewClassLevel){
		  $ExperinceNeeded =  round((pow(($NewClassLevel - .5),2)+.25)*500);  // Level minus .5 times itself plus .25 times 500
		  
		  
	  }
	  
	  
	  
  }
?>
